﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLBH.DATA
{
    public class ChucNangData
    {
        private static QLBHEntities db = new QLBHEntities();
        public string Error { set; get; }
        public List<CHUC_NANG> TimChucNangTheoTen(string ten_chuc_nang)
        {
            db = new QLBHEntities();
            return db.CHUC_NANG.ToList().Where(p => p.TEN_CHUC_NANG.Contains(ten_chuc_nang)).ToList().Select(p => new CHUC_NANG()
                {
                    DA_XOA = p.DA_XOA,
                    MA_CHUC_NANG = p.MA_CHUC_NANG,
                    MO_TA = p.MO_TA,
                    TEN_CHUC_NANG = p.TEN_CHUC_NANG
                }).ToList();
        }
    }
}